package _01_第一季.树04.Tree01;

public class TestTree {
   /* @Test
    public void testAVL(){
        Integer[] datas = {10, 100, 42, 59, 97, 91};
        AVLTree<Integer> avl = new AVLTree<>();
        for (int i = 0; i < datas.length; i++) {
            avl.add(datas[i]);
        }
        BinaryTrees.println(avl);

        for (int i = 0; i < datas.length; i++) {
            avl.remove(datas[i]);
            System.out.println("["+datas[i]+"]");
            BinaryTrees.println(avl);
            System.out.println("---------------------");
        }
    }

    @Test
    public void testRBTree(){
        Integer[] datas = {55,87,56,74,96,22,62,20,70,68,90,50};
        RBTree<Integer> rbTree = new RBTree<>();
        for (int i = 0; i < datas.length; i++) {
            rbTree.add(datas[i]);
        }
        BinaryTrees.println(rbTree);
        for (int i = 0; i < datas.length; i++) {
            rbTree.remove(datas[i]);
            System.out.println("【"+datas[i]+"】");
            BinaryTrees.println(rbTree);
            System.out.println("------------------------");
        }
    }*/
}
